package com.eastmoney.emis.edda.infrastructure.eddi.mapper;

import com.eastmoney.emis.datasource.annotation.TargetDataSource;
import com.eastmoney.emis.edda.common.DbName;
import com.eastmoney.emis.edda.infrastructure.eddi.po.EmhkBankTrademidPo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;

/**
 * @description: Description
 * @projectName: EDDA-HSBC
 * @package: com.eastmoney.emis.edda.infrastructure.eddi.mapper
 * @author: 汪程程
 * @date: 2022/10/11 1:05 PM
 * @version: 1.0
 */
@Mapper
public interface EmhkBankTrademidMapper {

    @TargetDataSource(DbName.ACCOUNT)
    void addEmhkBankTrademid(@Param("clientId") String clientId, @Param("bankTrademidPo") EmhkBankTrademidPo emhkBankTrademidPo);

    @TargetDataSource(DbName.ACCOUNT)
    List<EmhkBankTrademidPo> findAllUnCompletedByEITime(@Param("date") Date date);
    @TargetDataSource(DbName.ACCOUNT)
    void updateEmhkBankTrademid(@Param("clientId") String clientId, @Param("bankTrademidPo") EmhkBankTrademidPo emhkBankTrademidPo);

    @TargetDataSource(DbName.ACCOUNT)
    EmhkBankTrademidPo findByEid(@Param("eid") String eid);

    @TargetDataSource(DbName.ACCOUNT)
    String getEid(@Param("clientId") String clientId);

    @TargetDataSource(DbName.ACCOUNT)
    void updateMandateId(@Param("clientId") String clientId,  @Param("eid") String eid, @Param("mandateId") String mandateId);
}
